<template>
    <div id="userLayout" :class="['user-layout-wrapper', device]">

        <div class="container login-form">
            <div class="top" v-if="isMobile()" style="margin-bottom: 20%;">
                <div class="header">
                    <img src="~@/assets/logo-white.png" class="logo" alt="logo">
                    <span class="title">聚医云系统</span>
                </div>
            </div>
            <div class="top" v-if="!isMobile()">
                <div class="header">
                    <a href="/">
                        <img src="~@/assets/logo-white.png" class="logo" alt="logo">
                        <span class="title">聚医云系统</span>
                    </a>
                </div>
                <div class="desc">
                    努力做标准化，数据化，智能化，先进的企业级收运管理系统体系
                </div>
            </div>
            <route-view></route-view>
        </div>

        <div class="footer">
            <div class="copyright" v-if="isMobile()" style="margin-top: -80px">
                <div>
                    <a href="https://beian.miit.gov.cn/" target="_blank" title="贵公网安备52011302005048号">
                        贵公网安备52011302005048号
                    </a>
                </div>
                <div>
                    <a href="https://beian.miit.gov.cn/" target="_blank" title="黔ICP备2021001214号-1">
                        黔ICP备2021001214号-1

                    </a>
                </div>
            </div>
            <div class="copyright" v-else>
                <span >Copyright &copy; 2021</span>
                <a href="https://gzhc.vip/" target="_blank" style="margin: 0 10px;  "
                   title="贵州信息科技有限公司">
                    鸿创信息
                </a>
                <div style="margin:  10px ;">
                    <span><img src="~@/assets/beian.png" style="width: 20px;height: 20px;margin-right: 5px" alt="beian"></span>
                    <a href="https://beian.mps.gov.cn/#/query/websearch?code=52011302005048" style="margin-right: 10px" target="_blank" title="贵公网安备52011302005048号">
                        贵公网安备52011302005048号
                    </a>
                    <a href="https://beian.miit.gov.cn/" target="_blank" title="黔ICP备2021001214号-1">
                        黔ICP备2021001214号-1
                    </a>
                </div>
            </div>
        </div>

    </div>
</template>

<script>
  import RouteView from '@/components/layouts/RouteView'
  import { mixinDevice } from '@/utils/mixin.js'

  export default {
    name: 'UserLayout',
    components: { RouteView },
    mixins: [mixinDevice],
    data() {
      return {}
    },
    mounted() {
      document.body.classList.add('userLayout')
    },
    beforeDestroy() {
      document.body.classList.remove('userLayout')
    }
  }
</script>

<style lang="less" scoped>

    #userLayout.user-layout-wrapper {
        height: 100%;
        &.mobile {
            .container {
                .main {
                    /*max-width: 368px;*/
                    width: 98%;
                }
            }
        }

    }
    #userLayout{
        padding: 10%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .container {
        width: 100%;
        min-height: 100%;
        background-size: 100%;
        position: relative;

        a {
            text-decoration: none;
        }

        .top {
            text-align: center;

            .header {
                height: 44px;
                line-height: 44px;

                .badge {
                    position: absolute;
                    display: inline-block;
                    line-height: 1;
                    vertical-align: middle;
                    margin-left: -12px;
                    margin-top: -10px;
                    opacity: 0.8;
                }

                .logo {
                    height: 60px;
                    vertical-align: top;
                    margin-right: 16px;
                    border-style: none;
                }

                .title {
                    font-size: 33px;
                    color: #ffffff;
                    font-weight: 600;
                    position: relative;
                    top: 2px;
                }
            }

            .desc {
                font-size: 14px;
                color: #eeeeee;
                margin-top: 12px;
                margin-bottom: 40px;
            }
        }

        .main {
            min-width: 260px;
            width: 368px;
            margin: 0 auto;
        }

    }

    .login-form {
        position: relative;
        max-width: 100%;
        width: 600px;
        padding: 4.5vh;
        overflow: hidden;
        background: url('~@/assets/img/back/login_form.png');
        background-size: 100% 100%;
    }
    .footer {
        position: absolute;
        width: 100%;
        bottom: 0;
        padding: 0 16px;
        margin: 48px 0 24px;
        text-align: center;
        left: 0;

        .links {
            margin-bottom: 8px;
            font-size: 14px;

            a {
                color: #eeeeee;
                transition: all 0.3s;

                &:not(:last-child) {
                    margin-right: 40px;
                }
            }
        }

        .copyright {
            color: #eeeeee;
            font-size: 14px;
        }
    }
</style>
